package study.javaee.practice.dao;

import java.util.List;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import study.javaee.practice.entity.ProjectMember;
import study.javaee.practice.entity.vo.MemberVO;

public interface ProjectMemberDao extends BaseMapper<ProjectMember> {
    @Select("select m.project_id id,p.`name`,u.`name` username,u.id userId from project_member m,user u,project p where m.user_id=u.id and m.project_id=p.id and m.project_id=#{id}")
    List<MemberVO> getMemberVoById(Integer id);

    @Select("select m.project_id id,p.`name` name,u.`name` username,u.id userId from project_member m,user u,project p where m.user_id=u.id and m.project_id=p.id")
    List<MemberVO> getAllMemberVo();
}